//
//  BaseTableSectionModel.m
//  YiCuiMiaoZhang
//
//  Created by Sings on 2019/4/8.
//  Copyright © 2018 益萃网络科技（中国）有限公司. All rights reserved.
//

#import "BaseTableSectionModel.h"

@implementation BaseTableSectionModel

- (NSMutableArray *)rowArray {
    if (_rowArray == nil) { _rowArray = [NSMutableArray array]; }
    return _rowArray;
}

- (BaseViewModel *)sectionHeaderView {
    if (_sectionHeaderView == nil) {
        TableViewMinHeaderFooterViewModel *headerViewModel =
        [[TableViewMinHeaderFooterViewModel alloc] init];
        _sectionHeaderView = headerViewModel;
    }
    return _sectionHeaderView;
}

- (BaseViewModel *)sectionFooterView {
    if (_sectionFooterView == nil) {
        TableViewMinHeaderFooterViewModel *footerViewModel =
            [[TableViewMinHeaderFooterViewModel alloc] init];
        _sectionFooterView = footerViewModel;
    }
    return _sectionFooterView;
}

- (void) refreshFun {
    if (self.sectionRefresh) {
        self.sectionRefresh(UITableViewRowAnimationFade);
    }
}

- (void) refreshTableFun {
    if (self.tableRefresh) {
        self.tableRefresh(UITableViewRowAnimationFade);
    }
}

- (NSString *) strTabbar {
    if (_strTabbar == nil) {
        _strTabbar = @"";
    }
    return _strTabbar;
}

@end
